package com.mengniu.commerce.collect.third.response.order;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.List;

@Data
public class BaseOrderInfoResponse {

    private Code code;
    @lombok.Data
    public static class Code {
        private String errcode;
        private String errmsg;
    }

    @lombok.Data
   public static class OrderInfo {
        @JsonProperty("orderBaseInfo")
        private OrderBaseInfo orderBaseInfo;
        @JsonProperty("operatorInfo")
        private OperatorInfo operatorInfo;
        @JsonProperty("buyerInfo")
        private BuyerInfo buyerInfo;
       /* @JsonProperty("invoiceInfo")
        private InvoiceInfo invoiceInfo;*/
        @JsonProperty("orderFulfill")
        private OrderFulfill orderFulfill;
        @JsonProperty("merchantInfo")
        private MerchantInfo merchantInfo;
        @JsonProperty("items")
        private List<Item> items;
        @JsonProperty("payInfo")
        private PayInfo payInfo;
        @JsonProperty("discountInfos")
        private List<DiscountInfo> discountInfos;
    }

    @lombok.Data
   public static class OrderBaseInfo {
        private Long autoCancelTime;
        private Integer orderType;
        private Long finishTime;
        private Integer orderSource;
        private Long orderNo;
        private Long payTime;
        private Integer deliveryType;
        private Integer orderStatus;
        private Integer channelType;
        private Long confirmTime;
        private Long updateTime;
        private Long parentOrderNo;
        private Long finishDeliveryTime;
        private Integer payType;
        private String thirdOrderNo;
        private Integer isDeleted;
        private Long createTime;
        private Integer bizSourceType;
        private Integer payStatus;
    }

    @lombok.Data
    public static class OperatorInfo {
        private String operatorId;
        private String wid;
        private String operatorName;
        private String operatorPhone;
        //10001-线上网店；10002-线下门店
        private Long saleChannelType;
    }
    @lombok.Data
    public static class BuyerInfo {
        private String buyerRemark;
        private String wid;
    }

  /*  @lombok.Data
   public static class InvoiceInfo {
        private Integer titleType;
        @JsonProperty("receiverInfo")
        private ReceiverInfo receiverInfo;
        @JsonProperty("titleInfo")
        private TitleInfo titleInfo;
        private Integer invoiceType;
        private Integer invoiceStatus;
    }

    @lombok.Data
   public static class ReceiverInfo {
        private String receiverTel;
        private String receiverEmail;
    }*/

    /*@lombok.Data
   public static class TitleInfo {
        private String bankAccount;
        private String titleName;
        private String companyAddress;
        private String companyTel;
        private String taxNumber;
        private String bankAddress;
    }*/

    @lombok.Data
   public static class OrderFulfill {
        private Long deliveryTime;
        private Integer expRcvType;
        @JsonProperty("receiverInfo")
        private FulfillReceiverInfo receiverInfo;
        private Integer deliveryType;
        private Long expRcvDate;
        private String deliverySubCode;
        private String deliveryCoName;
        /*@JsonProperty("orderCycleInfo")
        private OrderCycleInfo orderCycleInfo;*/
    }

    @lombok.Data
   public static class FulfillReceiverInfo {
        private String area;
        private String zip;
        private String address;
        private String city;
        private String cityCode;
        private String provinceCode;
        private String latitude;
        private String county;
        /*@JsonProperty("certificateInfo")
        private CertificateInfo certificateInfo;*/
        private String areaCode;
        private String countyCode;
        private String province;
        private String phone;
        private String name;
        private String longitude;
    }

   /* @lombok.Data
   public static class CertificateInfo {
        private String behindImg;
        private String frontImg;
        private String userName;
        private String certificateNo;
        private String certificateType;
    }*/

    /*@lombok.Data
   public static class OrderCycleInfo {
        @JsonProperty("cycleSkuInfo")
        private CycleSkuInfo cycleSkuInfo;
    }*/

   /* @lombok.Data
   public static class CycleSkuInfo {
        private Integer cycleFrequency;
        private Integer cycleNum;
    }*/

    @lombok.Data
   public static class MerchantInfo {
        private Integer productId;
        private Long productInstanceId;
        private Long processVid;
        private String productName;
        private String vidName;
        private String processVidName;
        private Long vid;
        private Long merchantId;
        private String bosName;
        private Long bosId;
        @JsonProperty("merchantExtInfo")
        private MerchantExtInfo merchantExtInfo;
        private Integer processVidType;
        private Integer vidType;
    }

    @lombok.Data
   public static class MerchantExtInfo {
        private String outShopName;
        private String processVidNumber;
        private String vidNumber;
        private String outShopCode;
        private Long deliveryVid;
    }

    @lombok.Data
   public static class Item {
        private String goodsPreviewUrl;
        private Long goodsId;
        private String skuBarCode;
        private Integer unitType;
        private Integer subGoodsType;
        @JsonProperty("activityTypeList")
        private List<Integer> activityTypeList;
        @JsonProperty("productInfos")
        private List<ProductInfo> productInfos;
        private String imageUrl;
        private Long skuId;
        @JsonProperty("discountInfos")
        private List<DiscountInfo> discountInfos;
        private String unitName;
        private String salePrice;
        private Integer weight;
       /* @JsonProperty("priceInfos")
        private List<PriceInfo> priceInfos;*/
        private String skuAttrInfo;
        private Integer goodsType;
        private Integer deductStockStrategy;
        private Integer volume;
        private Long itemId;
        private String goodsTitle;
        private String goodsCode;
       /* @JsonProperty("payInfo")
        private ItemPayInfo payInfo;*/
        private Integer categoryId;
        private String skuCode;
        private String skuNum;
    }

    @lombok.Data
   public static class ProductInfo {
        private String itemSkuQuantity;
        private String price;
        private Long combSkuId;
        private String combTitle;
        private String title;
        /*@JsonProperty("productExt")
        private ProductExt productExt;*/
        private Integer productType;
    }

   /* @lombok.Data
   public static class ProductExt {
        private String unit;
        private String productCode;
        private String imageUrl;
        private Long skuId;
        private String skuCode;
        private String productAttribute;
    }*/

    @lombok.Data
   public static class DiscountInfo {
        private Integer discountLevel;
        /*@JsonProperty("discountExt")
        private DiscountExt discountExt;*/
        private String name;
        private String costAmount;
        private String discountAmount;
        private Integer discountType;
        private Integer subType;
        private String discountId;
    }

    /*@lombok.Data
   public static class DiscountExt {
        @JsonProperty("feeDiscountDetailInfos")
        private List<FeeDiscountDetailInfo> feeDiscountDetailInfos;
        private Integer attributionType;
    }*/

   /* @lombok.Data
   public static class FeeDiscountDetailInfo {
        private Integer costAmount;
        private Integer discountAmount;
        private String feeId;
    }*/

   /* @lombok.Data
   public static class PriceInfo {
        private String amount;
        private String description;
        private Integer type;
    }*/

    /*@lombok.Data
   public static class ItemPayInfo {
        private String shouldPayAmount;
        private String totalAmount;
        private String payAmount;
        private String totalDiscountAmount;
        @JsonProperty("amountInfos")
        private List<AmountInfo> amountInfos;
    }
*/
    @lombok.Data
   public static class AmountInfo {
        private String shouldPayAmount;
        private String amount;
        private String payAmount;
        /*@JsonProperty("amountExt")
        private AmountExt amountExt;*/
        private String description;
        private Integer type;
    }

  /*  @lombok.Data
   public static class AmountExt {
        @JsonProperty("feeDetailInfos")
        private List<FeeDetailInfo> feeDetailInfos;
    }*/

   /* @lombok.Data
   public static class FeeDetailInfo {
        private Integer shouldPayAmount;
        private Integer amount;
        private Integer payAmount;
        private Integer subType;
        private String relationId;
        private String feeId;
    }*/

    @lombok.Data
   public static class PayInfo {
        private String shouldPayAmount;
        private String totalAmount;
        private String payAmount;
        private String totalDiscountAmount;
        @JsonProperty("amountInfos")
        private List<AmountInfo> amountInfos;
        @JsonProperty("payItems")
        private List<PayItem> payItems;
    }

    @lombok.Data
   public static class PayItem {
        private Integer phase;
        private Integer payType;
        @JsonProperty("payCouponInfos")
        private List<PayCouponInfo> payCouponInfos;
        private Long payTime;
        private String channelTrxNo;
        @JsonProperty("payMethodIds")
        private List<Integer> payMethodIds;
        private String tradeId;
        @JsonProperty("payItemExtInfo")
        private PayItemExtInfo payItemExtInfo;
    }

    @lombok.Data
   public static class PayCouponInfo {
        private Integer amount;
        private String name;
        private String channelType;
        private String id;
        private String type;
    }

    @lombok.Data
   public static class PayItemExtInfo {
        private Long customPayMethodId;
        private String amount;
        private String interactId;
        private String customPayMethodName;
        private String channelMid;
    }

    @lombok.Data
   public static class FulfillInfo {
        private String exception;
        private Integer fulfillType;
        private Long receivingTime;
        @JsonProperty("deliveryInfo")
        private DeliveryInfo deliveryInfo;
        private Long orderNo;
        @JsonProperty("sendInfo")
        private SendInfo sendInfo;
        private Long deliveryTime;
        private Long expectFulfillTime;
        @JsonProperty("consignOrder")
        private ConsignOrder consignOrder;
       /* @JsonProperty("receiveInfo")
        private ReceiveInfo receiveInfo;*/
        private String remark;
        private Long updateTime;
        private Long autoReceivingTime;
        private Long cancelTime;
        private Integer fulfillStatus;
        private Long fulfillNo;
        private Integer isSplitPackage;
        private Long autoDeliveryTime;
        private Long deliveryVid;
        private Integer fulfillMethod;
    }

    @lombok.Data
   public static class DeliveryInfo {
        private String companyCode;
        private String number;
        private Long expectReceivedStartTime;
        private Long expectReceivedEndTime;
        private Long writeOffId;
        private String companyName;
        private String statusName;
        private Long expectReceivedDate;
        private String writeOffName;
        private String expectReceivedTypeName;
        private Integer expectReceivedType;
        private Integer status;
    }

    @lombok.Data
   public static class SendInfo {
        @JsonProperty("addressInfo")
        private AddressInfo addressInfo;
        private String senderAddress;
       /* @JsonProperty("sender")
        private Sender sender;*/
    }

    @lombok.Data
   public static class AddressInfo {
        private String area;
        private String zip;
        private String address;
        @JsonProperty("addressExt")
        private AddressExt addressExt;
        private String province;
        private String city;
        private String latitude;
        private String county;
        private String longitude;
    }

    @lombok.Data
   public static class AddressExt {
        private String areaCode;
        private String countyCode;
        private String cityCode;
        private String provinceCode;
    }

    /*@lombok.Data
   public static class Sender {
        private String senderName;
        private String senderMobile;
    }*/

    @lombok.Data
   public static class ConsignOrder {
        private Long consignTime;
        private Long cancelTime;
        private Integer cancelType;
        private Long confirmEndTime;
        private Long fulfillNo;
       /* @JsonProperty("consignItems")
        private List<ConsignItem> consignItems;*/
        private String consignVidName;
        private Long confirmTime;
        private String pickupCode;
        /*@JsonProperty("confirmInfo")
        private ConfirmInfo confirmInfo;*/
        private Integer confirmType;
        @JsonProperty("logisticsInfo")
        private LogisticsInfo logisticsInfo;
    }

/*    @lombok.Data
   public static class ConsignItem {
        @JsonProperty("consignExts")
        private List<ConsignExt> consignExts;
    }

    @lombok.Data
   public static class ConsignExt {
        private String code;
        private String name;
        private Long templateId;
        private Integer type;
    }*/

   /* @lombok.Data
   public static class ConfirmInfo {
        private Long vid;
        private Long wid;
        private String phone;
        private String name;
        private String vidName;
        private Integer vidType;
    }*/

    @lombok.Data
   public static class LogisticsInfo {
        private String companyCode;
        private String companyName;
        private String deliveryNo;
        private Long appointment;
        private String remark;
        private String outOrderNo;
    }



}
